import request from '@/utils/request'

export function selectWorkTypeList(params) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/selectAll?&currentPage=' + params.currentPage + '&pageSize=' + params.pageSize,
    method: 'get'
  })
}
export function deleteList(params) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/delete?id=' + params.id + '&userId=' + params.userId,
    method: 'get'
  })
}

export function deleteBatch(params) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/deleteBatch',
    method: 'post',
    data: params
  })
}
export function updateUseStatus(params) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/updateUseStatus?id=' + params.id + '&userId=' + params.userId + '&useStatus=' + params.useStatus,
    method: 'get'
  })
}
export function selectByName(params) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/selectByName',
    method: 'post',
    data: params
  })
}
// 判断是否可编辑
export function judgeEditableById(id) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/judgeEditableById?id=' + id,
    method: 'get'
  })
}
